package com.ryskoo.common.hclconstant;

/**
 * 配送方式
 * @author BeHappy
 */
public enum SendTypeEnum {
    EXPRESS(1, "快递"),
    PICKUP(2, "自提");
    private int value;
    private String name;

    SendTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(int value) {
        for (SendTypeEnum o : SendTypeEnum.values()) {
            if (o.getValue() == value) {
                return o.getName();
            }
        }
        return "";
    }
}
